<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
    <title>DupPRRec</title>

    <!-- Bootstrap -->
    <link href= "{{ url_for('static', filename='css/bootstrap.min.css') }}" rel="stylesheet">
    <link href= "{{ url_for('static', filename='css/add.css') }}" rel="stylesheet">

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>
  <body>
   
        <nav class="navbar navbar-default navbar-fixed-top" style="background-color: #FFFFFF; border: 0px solid" >
            <div class="container" >
              <div class="row title_row">
                  <div class="col-xs-12 col-sm-10 col-sm-push-1">
                    <h1 class="text-center">Duplicate PR Recommender</h1>
                  </div>
                </div>

              <div id="search" class="row search_row">
                  <div class="col-xs-12 col-sm-10 col-sm-push-1 text-center">
                    <form class="form-inline">
                        <!-- 下拉列表 -->
                        <div class="form-group">
                            <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                              <span id="repo_s" repo-id={{repos[0].id}}>{{ repos[0].user_name}}/{{ repos[0].repo_name}}</span>
                              <span class="caret"></span>
                            </button>
            
                            <ul class="dropdown-menu repos">
                              <!-- 项目列表加在这里 -->
                              {% for repo in repos %}
                              <li class="repo-li"> <a class="repo_h" repo-id={{repo.id}}>{{repo.user_name}}/{{repo.repo_name}}</a></li>
                              {% endfor %}
                            </ul>
                        </div> 
            
                        <input id ="repo_n" type="text" class="form-control" placeholder="PR number" / > 
                        <button class="btn btn-info btn-search" id="btn_detect" >Detect</button>
                    </form>
                      <br/>
                  </div>
              </div>

              <div id="exa_pr" class="row" style="display: none"  >
                    <div class="col-xs-12 col-sm-10 col-sm-push-1" >
                      <ul >
                          <li class="exa_li">
                                  <div class="row pr_info">
                                    <a>
                                      #<strong id="pr_number"></strong>: 
                                      submited at <span id="pr_time"></span> by <span id="pr_author" ></span> 
                                    </a> 
                                  </div>
          
                                  <div class="row pr_title">
                                    <span class="col-sm-1">Title:</span>
                                    <div class="col-sm-11">
                                      <span id="pr_title"></span>
                                    </div>
                                  </div>
          
                                  <div class="row pr_desc">
                                    <span class="col-sm-1">Desc:</span>
                                    <textarea id="pr_desc" class="col-sm-11" disabled="disabled">
                                    </textarea>
                                  </div>
          
                                  <div class="row pr_file">
                                      <span class="col-sm-1">Files:</span>
                                      <textarea id="pr_file" class="col-sm-11"  disabled="disabled"></textarea>
                                  </div>
                            </li>     
                      </ul>
                    </div>
                </div>
                
              </div>
              <div style="height:20px; background-color: #FFFFFF"></div>
            </nav>

	   
    <div class="container">
      <!-- 探测结果 -->
      <div id="resultRow" class="row" style="display: none">
          <div class="col-xs-12 col-sm-10 col-sm-push-1">
            <ul id ="pr_rows"></ul>
            <ul style="display: none"  >
                <li id="pr_template" >
                    <div class="row">
                      <div class="col-sm-10">

                        <div class="row pr_info">
                           <a class="col-sm-11">
                             #<strong id="pr_number"></strong>: 
                             submited at <span id="pr_time"></span> by <span id="pr_author" ></span> 
                           </a> 
                            <strong class="col-sm-1"> Sim.</strong>
                        </div>

                        <div class="row pr_title">
                          <span class="col-sm-1">Title:</span>
                          <div class="col-sm-10">
                            <span id="pr_title"></span>
                          </div>
                          <strong class="col-sm-1">0.34</strong>
                        </div>

                        <div class="row pr_desc">
                          <span class="col-sm-1">Desc:</span>
                          <textarea id="pr_desc" class="col-sm-10" disabled="disabled">
                          </textarea>
                          <strong class="col-sm-1">0.56</strong>
                        </div>

                        <div class="row pr_file">
                            <span class="col-sm-1">Files:</span>
                            <textarea id="pr_file" class="col-sm-10" disabled="disabled">
                            </textarea>
                            <strong class="col-sm-1">0.12</strong>
                        </div>

                      </div>
                      <div class="col-sm-2 text-center" style="margin:5px auto">
                          <div class="row">
                            <button type="button" class="btn btn-success" id="btn_yes">Yes</button>
                          </div>
                          <br/>
                          <div class="row">
                            <button type="button" class="btn btn-danger" id="bnt_no">No</button>
                          </div>
                      </div>
                    </div>
                  </li>     
            
            </ul>
          </div>
      </div>

      <br/>
    </div>
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src= "{{ url_for('static', filename='js/jquery.min.js') }}"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="{{ url_for('static', filename='js/bootstrap.min.js') }}"></script>
    <script src="{{ url_for('static', filename='js/app.js') }}"></script>
  </body>
</html>
